package com.aust.furniture.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.aust.furniture.entity.Furniture;

import java.util.List;

/**
 * 家具的service接口
 */
public interface IFurnitureService extends IService<Furniture> {
    /**
     * 分页查询家具数据
     * @param pageNum 第几页
     * @param pageSize 每页多少条数据
     * @param param 查询参数-家具名称
     * @return
     */
    public IPage<Furniture> selectFurniturePage(int pageNum, int pageSize, String param);

    /**
     * 新增一条家具信息
     * @param furniture
     */
    public int addFurniture(Furniture furniture);

    /**
     * 修改一条家具信息
     * @param furniture
     */
    public int editFurniture(Furniture furniture);

    /**
     * 根据主键id查询一个家具对象
     * @param id
     * @return
     */
    public Furniture queryFurnitureById(Integer id);

    /**
     * 根据主键id删除一个家具对象
     * @param id
     * @return
     */
    public int delFurnitureById(Integer id);

    /**
     * 查询所有家具
     * @return
     */
    public List<Furniture> queryFurnitureList();
}
